import React from 'react'

function Tap(props) {
  return (
    <div>
    <div className='da-da'>
    {
      props.data.map(item =>{
        return <div key={item.id} onClick={()=>{props.setactiveindex(item.id)}} className={props.activeindex==item.id?'active':''}>{item.name}</div>
      })
    }
  </div>
    </div>
  )
}

export default Tap